package main

import (
	"fmt"
	"math"
	"reflect"
	"runtime"
)

var a = 1
var b = 2

func variable() {
	var a int
	var s string
	// %q会打印"""
	fmt.Printf("%d , %q \n", a, s)
}
func apply(op func(int, int) int, a, b int) int {
	p := reflect.ValueOf(op).Pointer()
	opNmae := runtime.FuncForPC(p).Name()
	fmt.Printf("Calling function %s with args "+"(%d,%d) \n", opNmae, a, b)
	return op(a, b)
}
func pow(a, b int) int {
	return int(math.Pow(float64(a), float64(b)))
}
func main() {
	fmt.Println()
	fmt.Println(apply(pow, 3, 4))
}
